<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Arduino MIDI File Parser: midi::RingBuffer Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Arduino MIDI File Parser
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>midi</b></li><li class="navelem"><a class="el" href="classmidi_1_1RingBuffer.html">RingBuffer</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classmidi_1_1RingBuffer-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">midi::RingBuffer Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="classmidi_1_1RingBuffer.html" title="RingBuffer that supports extensive peek operations to access and compare the next values.">RingBuffer</a> that supports extensive peek operations to access and compare the next values.  
 <a href="classmidi_1_1RingBuffer.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="RingBuffer_8h_source.html">RingBuffer.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a041ae18148dedd98be3f9230c4ad1897"><td class="memItemLeft" align="right" valign="top"><a id="a041ae18148dedd98be3f9230c4ad1897"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>RingBuffer</b> (<a class="el" href="classmidi_1_1RingBuffer.html">RingBuffer</a> &amp;t)</td></tr>
<tr class="separator:a041ae18148dedd98be3f9230c4ad1897"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89c12fca15a4680f9b86f331618d013d"><td class="memItemLeft" align="right" valign="top"><a id="a89c12fca15a4680f9b86f331618d013d"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>RingBuffer</b> (int <a class="el" href="classmidi_1_1RingBuffer.html#ad563dc1d6c0ca23612781d957c565b75">size</a>)</td></tr>
<tr class="separator:a89c12fca15a4680f9b86f331618d013d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0c3fa1f754ef133df24f344c7e0a14b"><td class="memItemLeft" align="right" valign="top"><a id="ab0c3fa1f754ef133df24f344c7e0a14b"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><b>read</b> ()</td></tr>
<tr class="separator:ab0c3fa1f754ef133df24f344c7e0a14b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:accbbc6da6d93615ac567565c145c38fd"><td class="memItemLeft" align="right" valign="top"><a id="accbbc6da6d93615ac567565c145c38fd"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>isFull</b> ()</td></tr>
<tr class="separator:accbbc6da6d93615ac567565c145c38fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98476832706860367383a26ad35c3da5"><td class="memItemLeft" align="right" valign="top"><a id="a98476832706860367383a26ad35c3da5"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>isEmpty</b> ()</td></tr>
<tr class="separator:a98476832706860367383a26ad35c3da5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee74683973e5f59300f0bfbd37b72cd1"><td class="memItemLeft" align="right" valign="top"><a id="aee74683973e5f59300f0bfbd37b72cd1"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>write</b> (uint8_t data)</td></tr>
<tr class="separator:aee74683973e5f59300f0bfbd37b72cd1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa7c9164efd781a99e17c518da167a754"><td class="memItemLeft" align="right" valign="top"><a id="aa7c9164efd781a99e17c518da167a754"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>write</b> (const uint8_t *data, size_t len)</td></tr>
<tr class="separator:aa7c9164efd781a99e17c518da167a754"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49e1d7ef258b3f1b488020685f1bd3c8"><td class="memItemLeft" align="right" valign="top"><a id="a49e1d7ef258b3f1b488020685f1bd3c8"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>reset</b> ()</td></tr>
<tr class="separator:a49e1d7ef258b3f1b488020685f1bd3c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ea34b1bd6849cca913ccc1258e08ac1"><td class="memItemLeft" align="right" valign="top"><a id="a8ea34b1bd6849cca913ccc1258e08ac1"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>available</b> ()</td></tr>
<tr class="separator:a8ea34b1bd6849cca913ccc1258e08ac1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab3fa30635ac7c68475830ed108d6df4"><td class="memItemLeft" align="right" valign="top"><a id="aab3fa30635ac7c68475830ed108d6df4"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>availableForWrite</b> ()</td></tr>
<tr class="separator:aab3fa30635ac7c68475830ed108d6df4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af23c62fe72260e4ecd5a9cc82e5d00f2"><td class="memItemLeft" align="right" valign="top"><a id="af23c62fe72260e4ecd5a9cc82e5d00f2"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>resize</b> (int len)</td></tr>
<tr class="separator:af23c62fe72260e4ecd5a9cc82e5d00f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad563dc1d6c0ca23612781d957c565b75"><td class="memItemLeft" align="right" valign="top"><a id="ad563dc1d6c0ca23612781d957c565b75"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmidi_1_1RingBuffer.html#ad563dc1d6c0ca23612781d957c565b75">size</a> ()</td></tr>
<tr class="memdesc:ad563dc1d6c0ca23612781d957c565b75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the maximum capacity of the buffer. <br /></td></tr>
<tr class="separator:ad563dc1d6c0ca23612781d957c565b75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a373989e549415790bfb331441e8ed792"><td class="memItemLeft" align="right" valign="top"><a id="a373989e549415790bfb331441e8ed792"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>peek</b> ()</td></tr>
<tr class="separator:a373989e549415790bfb331441e8ed792"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd6516031da0820106c6a348231f8e89"><td class="memItemLeft" align="right" valign="top"><a id="afd6516031da0820106c6a348231f8e89"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmidi_1_1RingBuffer.html#afd6516031da0820106c6a348231f8e89">peek</a> (int idx)</td></tr>
<tr class="memdesc:afd6516031da0820106c6a348231f8e89"><td class="mdescLeft">&#160;</td><td class="mdescRight">peeks the idx next entry from the buffer <br /></td></tr>
<tr class="separator:afd6516031da0820106c6a348231f8e89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf30e4b7de8425b0e3243f5220206f04"><td class="memItemLeft" align="right" valign="top"><a id="acf30e4b7de8425b0e3243f5220206f04"></a>
uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmidi_1_1RingBuffer.html#acf30e4b7de8425b0e3243f5220206f04">peekStr</a> (int idx, int len)</td></tr>
<tr class="memdesc:acf30e4b7de8425b0e3243f5220206f04"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns a temporary copy of the requested bytes <br /></td></tr>
<tr class="separator:acf30e4b7de8425b0e3243f5220206f04"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41bd5105a362763778d0a8e27d3bcf23"><td class="memItemLeft" align="right" valign="top"><a id="a41bd5105a362763778d0a8e27d3bcf23"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmidi_1_1RingBuffer.html#a41bd5105a362763778d0a8e27d3bcf23">operator[]</a> (int idx)</td></tr>
<tr class="memdesc:a41bd5105a362763778d0a8e27d3bcf23"><td class="mdescLeft">&#160;</td><td class="mdescRight">alternaive syntax to peek(idx) <br /></td></tr>
<tr class="separator:a41bd5105a362763778d0a8e27d3bcf23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a583861751422aa94cb45626fed086680"><td class="memItemLeft" align="right" valign="top"><a id="a583861751422aa94cb45626fed086680"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmidi_1_1RingBuffer.html#a583861751422aa94cb45626fed086680">equals</a> (const char *str)</td></tr>
<tr class="memdesc:a583861751422aa94cb45626fed086680"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares the string with the current peek values. <br /></td></tr>
<tr class="separator:a583861751422aa94cb45626fed086680"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49adea581748cecf92b1b3ac99812e69"><td class="memItemLeft" align="right" valign="top"><a id="a49adea581748cecf92b1b3ac99812e69"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmidi_1_1RingBuffer.html#a49adea581748cecf92b1b3ac99812e69">consume</a> (int offset)</td></tr>
<tr class="memdesc:a49adea581748cecf92b1b3ac99812e69"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes the next n characters from the ringbuffer. <br /></td></tr>
<tr class="separator:a49adea581748cecf92b1b3ac99812e69"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a35a1db17a3a1eb6aa6d7bc939fd9feee"><td class="memItemLeft" align="right" valign="top"><a id="a35a1db17a3a1eb6aa6d7bc939fd9feee"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>nextIndex</b> (int index)</td></tr>
<tr class="separator:a35a1db17a3a1eb6aa6d7bc939fd9feee"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a0cd936e27b191e0d6f6f8954388e7772"><td class="memItemLeft" align="right" valign="top"><a id="a0cd936e27b191e0d6f6f8954388e7772"></a>
uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><b>_aucBuffer</b> = nullptr</td></tr>
<tr class="separator:a0cd936e27b191e0d6f6f8954388e7772"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3733ee13cbd67d8be7e286b4e9e6894"><td class="memItemLeft" align="right" valign="top"><a id="ae3733ee13cbd67d8be7e286b4e9e6894"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>_iHead</b></td></tr>
<tr class="separator:ae3733ee13cbd67d8be7e286b4e9e6894"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fb4ea8114290a4e961173e8381436bb"><td class="memItemLeft" align="right" valign="top"><a id="a6fb4ea8114290a4e961173e8381436bb"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>_iTail</b></td></tr>
<tr class="separator:a6fb4ea8114290a4e961173e8381436bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9de81a13379226adb9a5d7f84e4beef"><td class="memItemLeft" align="right" valign="top"><a id="ae9de81a13379226adb9a5d7f84e4beef"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>_numElems</b></td></tr>
<tr class="separator:ae9de81a13379226adb9a5d7f84e4beef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6008fcad58cc850d437c966ce7a9c64"><td class="memItemLeft" align="right" valign="top"><a id="af6008fcad58cc850d437c966ce7a9c64"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>max_size</b> = 0</td></tr>
<tr class="separator:af6008fcad58cc850d437c966ce7a9c64"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classmidi_1_1RingBuffer.html" title="RingBuffer that supports extensive peek operations to access and compare the next values.">RingBuffer</a> that supports extensive peek operations to access and compare the next values. </p>
<dl class="section author"><dt>Author</dt><dd>Phil Schatzmann </dd></dl>
</div><hr/>The documentation for this class was generated from the following file:<ul>
<li>src/<a class="el" href="RingBuffer_8h_source.html">RingBuffer.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
